Rachel
Toggle table of contents
3.5.0
web
Target filter
web
Switch theme
Search in API
Skip to content
Rachel
love.yinlin.compose.platform-view
/
love.yinlin.compose.ui
/
[web]PlatformView
Platform
View
web
@
Stable
abstract
class
PlatformView
<
V
:
HTMLElement
>
:
BasicPlatformView
<
V
>
Members
Constructors
Platform
View
Link copied to clipboard
web
constructor
(
)
Properties
host
Link copied to clipboard
web
val
host
:
V
?
Functions
host
Link copied to clipboard
web
fun
host
(
block
:
(
V
)
->
Unit
)
:
Unit
?
Host
View
Link copied to clipboard
web
@
Composable
open
override
fun
HostView
(
modifier
:
Modifier
=
Modifier
)
Monitor
Link copied to clipboard
web
@
Composable
fun
Monitor
(
key1
:
Any
?
,
block
:
suspend
CoroutineScope
.
(
V
)
->
Unit
)
等同于 LaunchedEffect, 但会监听自身创建。 因为重组是无序的,使用 Monitor 可以避免 HostView 未被创建时就触发了 key 变化而后续不触发的问题。
@
Composable
fun
Monitor
(
vararg
keys
:
Any
?
,
block
:
suspend
CoroutineScope
.
(
V
)
->
Unit
)
@
Composable
fun
Monitor
(
key1
:
Any
?
,
key2
:
Any
?
,
block
:
suspend
CoroutineScope
.
(
V
)
->
Unit
)